using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
namespace Net35.Xrm.Sdk
{
	[CollectionDataContract(Name = "RelatedEntityCollection", Namespace = "http://schemas.microsoft.com/xrm/2011/Contracts")]
	public sealed class RelatedEntityCollection : DataCollection<Relationship, EntityCollection>
	{
		public override bool IsReadOnly
		{
			get
			{
				return base.IsReadOnly;
			}
			internal set
			{
				base.IsReadOnly = value;
				foreach (KeyValuePair<Relationship, EntityCollection> current in this)
				{
					if (current.Value != null)
					{
						current.Value.IsReadOnly = true;
					}
				}
			}
		}
	}
}
